.class public Lrexsee/core/alarm/RexseeAlarm;
.super Ljava/lang/Object;
.source "RexseeAlarm.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field public static final ALARM_ACTION:Ljava/lang/String; = "action.alarm.id_"

.field public static final ALARM_EXTRA_ARGU:Ljava/lang/String; = "argu"

.field public static final DATABASE_ALARM:Ljava/lang/String; = "alarm.db"

.field private static final INTERFACE_NAME:Ljava/lang/String; = "Alarm"

.field public static final TABLE_ALARM:Ljava/lang/String; = "alarm"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 44
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 45
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/alarm/RexseeAlarm;->mBrowser:Lrexsee/core/browser/Browser;

    .line 46
    iput-object p1, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    .line 47
    return-void
.end method

.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 40
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 41
    iput-object p1, p0, Lrexsee/core/alarm/RexseeAlarm;->mBrowser:Lrexsee/core/browser/Browser;

    .line 42
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    .line 43
    return-void
.end method

.method private static _deleteAlarm(Landroid/content/Context;Ljava/lang/String;)V
    .locals 4
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 81
    const-string v1, "alarm.db"

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-virtual {p0, v1, v2, v3}, Landroid/content/Context;->openOrCreateDatabase(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    .line 83
    .local v0, "db":Landroid/database/sqlite/SQLiteDatabase;
    :try_start_0
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "DELETE FROM alarm WHERE name=\'"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\';"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 86
    :goto_0
    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 87
    return-void

    .line 84
    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method private static _setAlarm(Landroid/content/Context;Landroid/app/AlarmManager;Ljava/lang/String;Z)V
    .locals 12
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "mgr"    # Landroid/app/AlarmManager;
    .param p2, "body"    # Ljava/lang/String;
    .param p3, "save"    # Z

    .prologue
    const/4 v1, 0x0

    .line 50
    new-instance v0, Lrexsee/core/notification/NotificationArgumentsSheet;

    invoke-direct {v0}, Lrexsee/core/notification/NotificationArgumentsSheet;-><init>()V

    invoke-virtual {v0, p2}, Lrexsee/core/notification/NotificationArgumentsSheet;->parseArguments(Ljava/lang/String;)Lrexsee/core/notification/NotificationArgumentsSheet;

    move-result-object v7

    .line 51
    .local v7, "argu":Lrexsee/core/notification/NotificationArgumentsSheet;
    iget-boolean v0, v7, Lrexsee/core/notification/NotificationArgumentsSheet;->notificationimmediately:Z

    if-eqz v0, :cond_0

    .line 52
    new-instance v0, Lrexsee/core/notification/RexseeNotification;

    invoke-direct {v0, p0}, Lrexsee/core/notification/RexseeNotification;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v7}, Lrexsee/core/notification/RexseeNotification;->show(Lrexsee/core/notification/NotificationArgumentsSheet;)V

    .line 54
    :cond_0
    invoke-virtual {v7}, Lrexsee/core/notification/NotificationArgumentsSheet;->getAlermFirstTime()J

    move-result-wide v2

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v10

    cmp-long v0, v2, v10

    if-lez v0, :cond_3

    .line 55
    new-instance v9, Landroid/content/Intent;

    const-class v0, Lrexsee/core/receiver/_Receiver;

    invoke-direct {v9, p0, v0}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 56
    .local v9, "intent":Landroid/content/Intent;
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v2, "action.alarm.id_"

    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, v7, Lrexsee/core/notification/NotificationArgumentsSheet;->alermname:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v9, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 57
    const-string v0, "argu"

    invoke-virtual {v9, v0, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 58
    const/high16 v0, 0x8000000

    invoke-static {p0, v1, v9, v0}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v6

    .line 59
    .local v6, "pendingIntent":Landroid/app/PendingIntent;
    invoke-virtual {p1, v6}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V

    .line 60
    invoke-virtual {v7}, Lrexsee/core/notification/NotificationArgumentsSheet;->getAlermRepeatInterval()J

    move-result-wide v4

    .line 61
    .local v4, "interval":J
    const-wide/16 v2, 0x0

    cmp-long v0, v4, v2

    if-lez v0, :cond_2

    .line 62
    invoke-virtual {v7}, Lrexsee/core/notification/NotificationArgumentsSheet;->getAlermFirstTime()J

    move-result-wide v2

    move-object v0, p1

    invoke-virtual/range {v0 .. v6}, Landroid/app/AlarmManager;->setRepeating(IJJLandroid/app/PendingIntent;)V

    .line 66
    :goto_0
    if-eqz p3, :cond_1

    .line 67
    const-string v0, "alarm.db"

    const/4 v2, 0x0

    invoke-virtual {p0, v0, v1, v2}, Landroid/content/Context;->openOrCreateDatabase(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v8

    .line 69
    .local v8, "db":Landroid/database/sqlite/SQLiteDatabase;
    :try_start_0
    const-string v0, "CREATE TABLE if not exists alarm (name TEXT, argu TEXT, Primary key(name));"

    invoke-virtual {v8, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 70
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "DELETE FROM alarm WHERE name=\'"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, v7, Lrexsee/core/notification/NotificationArgumentsSheet;->alermname:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\';"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v8, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 71
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "INSERT INTO alarm VALUES (\'"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, v7, Lrexsee/core/notification/NotificationArgumentsSheet;->alermname:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\', \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\');"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v8, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 74
    :goto_1
    invoke-virtual {v8}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 79
    .end local v4    # "interval":J
    .end local v6    # "pendingIntent":Landroid/app/PendingIntent;
    .end local v8    # "db":Landroid/database/sqlite/SQLiteDatabase;
    .end local v9    # "intent":Landroid/content/Intent;
    :cond_1
    :goto_2
    return-void

    .line 64
    .restart local v4    # "interval":J
    .restart local v6    # "pendingIntent":Landroid/app/PendingIntent;
    .restart local v9    # "intent":Landroid/content/Intent;
    :cond_2
    invoke-virtual {v7}, Lrexsee/core/notification/NotificationArgumentsSheet;->getAlermFirstTime()J

    move-result-wide v2

    invoke-virtual {p1, v1, v2, v3, v6}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V

    goto :goto_0

    .line 77
    .end local v4    # "interval":J
    .end local v6    # "pendingIntent":Landroid/app/PendingIntent;
    .end local v9    # "intent":Landroid/content/Intent;
    :cond_3
    invoke-static {p0, p2}, Lrexsee/core/alarm/RexseeAlarm;->exec(Landroid/content/Context;Ljava/lang/String;)V

    goto :goto_2

    .line 72
    .restart local v4    # "interval":J
    .restart local v6    # "pendingIntent":Landroid/app/PendingIntent;
    .restart local v8    # "db":Landroid/database/sqlite/SQLiteDatabase;
    .restart local v9    # "intent":Landroid/content/Intent;
    :catch_0
    move-exception v0

    goto :goto_1
.end method

.method public static exec(Landroid/content/Context;Ljava/lang/String;)V
    .locals 5
    .param p0, "context"    # Landroid/content/Context;
    .param p1, "body"    # Ljava/lang/String;

    .prologue
    .line 90
    new-instance v1, Lrexsee/core/notification/NotificationArgumentsSheet;

    invoke-direct {v1}, Lrexsee/core/notification/NotificationArgumentsSheet;-><init>()V

    invoke-virtual {v1, p1}, Lrexsee/core/notification/NotificationArgumentsSheet;->parseArguments(Ljava/lang/String;)Lrexsee/core/notification/NotificationArgumentsSheet;

    move-result-object v0

    .line 91
    .local v0, "argu":Lrexsee/core/notification/NotificationArgumentsSheet;
    invoke-virtual {v0}, Lrexsee/core/notification/NotificationArgumentsSheet;->getAlermRepeatInterval()J

    move-result-wide v1

    const-wide/16 v3, 0x0

    cmp-long v1, v1, v3

    if-gtz v1, :cond_0

    .line 92
    iget-object v1, v0, Lrexsee/core/notification/NotificationArgumentsSheet;->alermname:Ljava/lang/String;

    invoke-static {p0, v1}, Lrexsee/core/alarm/RexseeAlarm;->_deleteAlarm(Landroid/content/Context;Ljava/lang/String;)V

    .line 94
    :cond_0
    new-instance v1, Lrexsee/core/alarm/RexseeRemoteCommand;

    invoke-direct {v1, p0, p1}, Lrexsee/core/alarm/RexseeRemoteCommand;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v1}, Lrexsee/core/alarm/RexseeRemoteCommand;->exec()V

    .line 95
    return-void
.end method

.method public static updateAlarm(Landroid/content/Context;)V
    .locals 7
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    const/4 v6, 0x0

    const/4 v5, 0x0

    .line 97
    const-string v4, "alarm.db"

    invoke-virtual {p0, v4, v5, v6}, Landroid/content/Context;->openOrCreateDatabase(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    .line 98
    .local v1, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v4, "alarm"

    invoke-virtual {p0, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Landroid/app/AlarmManager;

    .line 100
    .local v3, "mgr":Landroid/app/AlarmManager;
    :try_start_0
    const-string v4, "CREATE TABLE if not exists alarm (name TEXT, argu TEXT, Primary key(name));"

    invoke-virtual {v1, v4}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 101
    const-string v4, "SELECT * from alarm;"

    const/4 v5, 0x0

    invoke-virtual {v1, v4, v5}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 102
    .local v0, "cursor":Landroid/database/Cursor;
    if-eqz v0, :cond_0

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v4

    if-eqz v4, :cond_0

    .line 103
    const/4 v2, 0x0

    .local v2, "i":I
    :goto_0
    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v4

    if-lt v2, v4, :cond_1

    .line 108
    .end local v2    # "i":I
    :cond_0
    invoke-interface {v0}, Landroid/database/Cursor;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 111
    .end local v0    # "cursor":Landroid/database/Cursor;
    :goto_1
    invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 112
    return-void

    .line 104
    .restart local v0    # "cursor":Landroid/database/Cursor;
    .restart local v2    # "i":I
    :cond_1
    :try_start_1
    invoke-interface {v0, v2}, Landroid/database/Cursor;->moveToPosition(I)Z

    .line 105
    const/4 v4, 0x1

    invoke-interface {v0, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    invoke-static {p0, v3, v4, v5}, Lrexsee/core/alarm/RexseeAlarm;->_setAlarm(Landroid/content/Context;Landroid/app/AlarmManager;Ljava/lang/String;Z)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 103
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 109
    .end local v0    # "cursor":Landroid/database/Cursor;
    .end local v2    # "i":I
    :catch_0
    move-exception v4

    goto :goto_1
.end method


# virtual methods
.method public cancel(Ljava/lang/String;)V
    .locals 6
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 141
    new-instance v0, Landroid/content/Intent;

    iget-object v3, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    const-class v4, Lrexsee/core/receiver/_Receiver;

    invoke-direct {v0, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 142
    .local v0, "intent":Landroid/content/Intent;
    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "action.alarm.id_"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 143
    iget-object v3, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    const/4 v4, 0x0

    const/high16 v5, 0x8000000

    invoke-static {v3, v4, v0, v5}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v2

    .line 144
    .local v2, "pendingIntent":Landroid/app/PendingIntent;
    iget-object v3, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    const-string v4, "alarm"

    invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/app/AlarmManager;

    .line 145
    .local v1, "mgr":Landroid/app/AlarmManager;
    invoke-virtual {v1, v2}, Landroid/app/AlarmManager;->cancel(Landroid/app/PendingIntent;)V

    .line 146
    iget-object v3, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    invoke-static {v3, p1}, Lrexsee/core/alarm/RexseeAlarm;->_deleteAlarm(Landroid/content/Context;Ljava/lang/String;)V

    .line 147
    return-void
.end method

.method public get()Ljava/lang/String;
    .locals 9

    .prologue
    const/4 v8, 0x0

    const/4 v7, 0x0

    const-string v5, "\""

    .line 119
    iget-object v5, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    const-string v6, "alarm.db"

    invoke-virtual {v5, v6, v7, v8}, Landroid/content/Context;->openOrCreateDatabase(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    .line 120
    .local v1, "db":Landroid/database/sqlite/SQLiteDatabase;
    const-string v4, ""

    .line 122
    .local v4, "rtn":Ljava/lang/String;
    :try_start_0
    const-string v5, "SELECT * from alarm;"

    const/4 v6, 0x0

    invoke-virtual {v1, v5, v6}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 123
    .local v0, "cursor":Landroid/database/Cursor;
    if-eqz v0, :cond_0

    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v5

    if-eqz v5, :cond_0

    .line 124
    const/4 v3, 0x0

    .local v3, "i":I
    :goto_0
    invoke-interface {v0}, Landroid/database/Cursor;->getCount()I

    move-result v5

    if-lt v3, v5, :cond_2

    .line 133
    .end local v3    # "i":I
    :cond_0
    invoke-interface {v0}, Landroid/database/Cursor;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 137
    .end local v0    # "cursor":Landroid/database/Cursor;
    :cond_1
    :goto_1
    invoke-virtual {v1}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 138
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, "["

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "]"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    return-object v5

    .line 125
    .restart local v0    # "cursor":Landroid/database/Cursor;
    .restart local v3    # "i":I
    :cond_2
    :try_start_1
    invoke-interface {v0, v3}, Landroid/database/Cursor;->moveToPosition(I)Z

    .line 126
    if-lez v3, :cond_3

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ","

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 127
    :cond_3
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "{"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 128
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "\"name\":\""

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const/4 v6, 0x0

    invoke-interface {v0, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\""

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 129
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, ",\"argu\":\""

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const/4 v6, 0x1

    invoke-interface {v0, v6}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "\""

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 130
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v6, "}"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v4

    .line 124
    add-int/lit8 v3, v3, 0x1

    goto/16 :goto_0

    .line 134
    .end local v0    # "cursor":Landroid/database/Cursor;
    .end local v3    # "i":I
    :catch_0
    move-exception v5

    move-object v2, v5

    .line 135
    .local v2, "e":Ljava/lang/Exception;
    iget-object v5, p0, Lrexsee/core/alarm/RexseeAlarm;->mBrowser:Lrexsee/core/browser/Browser;

    if-eqz v5, :cond_1

    iget-object v5, p0, Lrexsee/core/alarm/RexseeAlarm;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/alarm/RexseeAlarm;->getInterfaceName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_1
.end method

.method public getCurrentTime()J
    .locals 2

    .prologue
    .line 150
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    return-wide v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 24
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 20
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/alarm/RexseeAlarm;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Alarm"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getMillisPerDay()J
    .locals 2

    .prologue
    .line 156
    const-wide/32 v0, 0x5265c00

    return-wide v0
.end method

.method public getMillisPerHour()J
    .locals 2

    .prologue
    .line 153
    const-wide/32 v0, 0x36ee80

    return-wide v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 28
    new-instance v0, Lrexsee/core/alarm/RexseeAlarm;

    invoke-direct {v0, p1}, Lrexsee/core/alarm/RexseeAlarm;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public set(Ljava/lang/String;)V
    .locals 3
    .param p1, "body"    # Ljava/lang/String;

    .prologue
    .line 116
    iget-object v0, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lrexsee/core/alarm/RexseeAlarm;->mContext:Landroid/content/Context;

    const-string v2, "alarm"

    invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    .end local p0    # "this":Lrexsee/core/alarm/RexseeAlarm;
    check-cast p0, Landroid/app/AlarmManager;

    const/4 v1, 0x1

    invoke-static {v0, p0, p1, v1}, Lrexsee/core/alarm/RexseeAlarm;->_setAlarm(Landroid/content/Context;Landroid/app/AlarmManager;Ljava/lang/String;Z)V

    .line 117
    return-void
.end method
